package cn.gson.crm.control.interesting;

import java.sql.SQLException;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.gson.crm.control.base.BaseServlet;
import cn.gson.crm.model.dao.InterestingDao;

/**
 * Servlet implementation class DeleteInterestingServlet
 */
@WebServlet("/interesting/delete")
public class DeleteInterestingServlet extends BaseServlet {
	private static final long serialVersionUID = 1L;
	private InterestingDao indao=new InterestingDao();
	@Override
	protected void get(HttpServletRequest request, HttpServletResponse response) throws Exception {
		String[] ids = request.getParameterValues("id");
		try {
			for (String id : ids) {
				indao.deleteInterestingById(id);
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}
		//response.sendRedirect("job");
		redirect("interesting");
	}
}
